#pragma once

#include "Thermo.h"
#include "Magnet.h"
#include "GrapplingArm.h"
#include "Tool.h"

class Player;
class Arm;

class ToolManager
{
	GrapplingArm tgrapple;
	Magnet tmagnet;
	Thermo tthermo;

	bool thermoactive;
	bool magnetactive;
	bool grappleacitve;

	bool toolsdisabled;

	Player* player;

	Arm* frontArm;
	Arm* rearArm;

	bool frontArmAvailable;
	bool rearArmAvailable;

	ToolType fArm;
	ToolType rArm;

public:
	ToolManager(Player* owner);
	~ToolManager(void);

	void ToggleTool(ToolType tool);
	void Update(float deltaTime);
	void RenderFront( void ) const;
	void RenderRear( void ) const;
	void Disable(void);
	void Enable(void);

	bool GetIsGrapple(void) {return grappleacitve;}
	bool GetIsMagnet(void) {return magnetactive;}
	bool GetIsThermo(void) {return thermoactive;}

	Thermo& GetThermo(void) {return tthermo;}

	void SetToolHeading(ToolType tool, tVector2D heading);
	GrapplingArm& GetGrap(void) { return tgrapple; }
	Magnet& GetMag(void) { return tmagnet; }

	void SetFrontAvailable() { frontArmAvailable = true; }
	void SetRearAvailable() { rearArmAvailable = true; }
};

